﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
    [DataContract, Table("IcmMovementHistory")]
    public class MovementHistory
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "MoveHistId", ResourceType = typeof(Resources.MovementHistoryResource))]
        public int MoveHistId { get; set; }

        [ForeignKey("Asset")]
        [DataMember, Display(Name = "AssetId", ResourceType = typeof(Resources.MovementHistoryResource))]
        public int AssetId { get; set; }

        [DataMember, Display(Name = "MoveQty", ResourceType = typeof(Resources.MovementHistoryResource))]
        public int MoveQty { get; set; }

        [DataMember, Display(Name = "SourceLocation", ResourceType = typeof(Resources.MovementHistoryResource))]
        public string SourceLocation { get; set; }

        [DataMember, Display(Name = "DestinationLocation", ResourceType = typeof(Resources.MovementHistoryResource))]
        public string DestinationLocation { get; set; }

        [DataMember, Display(Name = "MoveRefNo", ResourceType = typeof(Resources.MovementHistoryResource))]
        public int? MoveRefNo { get; set; }

        [StringLength(50)]
        [DataMember, Display(Name = "MovementType", ResourceType = typeof(Resources.MovementHistoryResource))]
        public string MovementType { get; set; }

        [StringLength(2)]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MovementHistoryResource))]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.MovementHistoryResource))]
        public int CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.MovementHistoryResource))]
        public DateTime? CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.MovementHistoryResource))]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.MovementHistoryResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [DataMember]
        public int? TranGrpId { get; set; }

        [DataMember]
        public virtual Asset Asset { get; set; }
    }
}
